//
//  UITool.m
//  iphone.mobileoa
//  
//  Created by 李亚春 on 13-5-24.
//  Copyright (c) 2013年 Epoint. All rights reserved.
//

#import "UITool.h"
#import "TKAlertCenter.h"
#import "UIGlossyButton.h"

@implementation UITool

+(void)toast:(NSString *)message
{
    [[TKAlertCenter defaultCenter] postAlertWithMessage:message];
}

+(void)toast_mul:(NSString *)message
{
    dispatch_sync(dispatch_get_main_queue(), ^{
    [[TKAlertCenter defaultCenter] postAlertWithMessage:message];
    });
}


+(void)setGlossyButtonWithRed:(CGFloat)_red green:(CGFloat)_green blue:(CGFloat)_blue :(UIView *)btn
{
    UIGlossyButton *b;
    
    b = (UIGlossyButton*) btn;
	[b useWhiteLabel: YES];
    b.buttonCornerRadius = 5.0;
    b.buttonBorderWidth = 0.0f;
	[b setStrokeType: kUIGlossyButtonStrokeTypeBevelUp];
    b.tintColor = b.borderColor = [UIColor colorWithRed:_red/255.0f green:_green/255.0f blue:_blue/255.0f alpha:1.0f];
}

+(CGFloat)getScreenHeight
{
    return [[UIScreen mainScreen]bounds].size.height;
}

@end
